<?php
$id=intval($_GET['id']);
$cat=video_get_category($id);
$cache=new cache;
$og_url=HOME."video/c$id/".$cat['main']['alias']."/";
//-------------------------- GET TRUYEN ----------------
$sql ="SELECT * from blog_video where category=$id and status=1 order by id desc ";
$sql2="SELECT id from blog_video where  category=$id and status=1";

$pager = new Pagination($sql, 20, 5,$og_url,500);
$pager->setDebug(false);
$cache=new cache;
$data[info] = $pager->paginate($cache,$sql2);
$data[nav]	= $pager->renderFullNav();



$data1[title]="Video " . web_title($cat['main']['seo_title']) . " | Xem Video " . web_title($cat['main']['seo_title']) . " tại " . DOMAIN_NAME;
$data1['mota']=web_des($cat['main']['seo_description']);
$data1['keyword']=web_keyword($cat['main']['seo_keyword']);
$data['category']=$cat;

loadview('template/header_video',$data1);
loadview("video/category",$data);
loadview('template/footer_video');
exit();